<template>
    <div class="index">
        <!-- 组件占位符 -->
        <transition name="fade" mode="out-in">
            <router-view></router-view>
        </transition>
        
        <!-- 路由跳转按钮 -->
        <div class="tabbar">
            <!-- <router-link to="/index/home">首页</router-link> -->
            <!-- <router-link to="/index/tuan">爆爆团</router-link>
            <router-link to="/index/order">订单</router-link>
            <router-link to="/index/mine">我的</router-link> -->
            <!-- 借助 路由管理对象跳转 -->
            <span @click="$router.push('/index/home')">首页</span>
            <span @click="$router.push('/index/tuan')">爆爆团</span>
            <span @click="$router.push('/index/order')">订单</span>
            <span @click="$router.push('/index/mine')">我的</span>
        </div>
    </div>
</template>

<script>
export default {

}
</script>

<style lang="scss" scoped> 
    .tabbar{
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        width: 100%;
        padding: 10px 0;
        border-top: 1px solid #ccc;
        list-style: none;
        background: white;
    }
    
    // 入场动画
    .fade-enter{ //动画开始时
        opacity: 0;
    }
    .fade-enter-active{
        transition: all 1s;
    }
    .fade-enter-to{ //动画结束时
        opacity: 1;
    }
    //出场动画
    .fade-levae{ //动画开始时
        opacity: 0;
    }
    .fade-levae-active{
        transition: all 1s;
    }
    .fade-entlevaeer-to{ //动画结束时
        opacity: 1;
    }
</style>